<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>编辑图书</title>
    <link rel="stylesheet" href="../../static/css/minireset.css" />
    <link rel="stylesheet" href="../../static/css/common.css" />
    <link rel="stylesheet" href="../../static/css/style.css" />
    <link rel="stylesheet" href="../../static/css/cart.css" />
    <link rel="stylesheet" href="../../static/css/bookManger.css" />
    <link rel="stylesheet" href="../../static/css/register.css" />
    <link rel="stylesheet" href="../../static/css/book_edit.css" />
  </head>
  <body>
    <div class="header">
      <div class="w">
        <div class="header-left">
          <a href="../../index.html">
            <img src="../../static/img/logo.gif" alt=""
          /></a>
          <h1>编辑图书</h1>
        </div>
        <div class="header-right">
          <a class="order">图书管理</a>
          <a href="./order_manager.html" class="destory">订单管理</a>
          <a th:href="@{/book.do}" class="gohome">返回商城</a>
        </div>
      </div>
    </div>
    <div class="login_banner" th:object="${session.book}">
      <div class="register_form">
        <form th:action="@{/book.do}">
          <input type="hidden" name="operate" value="editBook"/>
          <input type="hidden" name="bookId" th:value="*{id}" >
          <div class="form-item">
            <div>
              <label>名称:</label>
              <input name="name" th:value="*{getBookName()}" placeholder="请输入名称" />
            </div>
          </div>
          <div class="form-item">
            <div>
              <label>价格:</label>
              <input name="price" th:value="*{getPrice()}" placeholder="请输入价格" />
            </div>
          </div>
          <div class="form-item">
            <div>
              <label>作者:</label>
              <input name="author" th:value="*{getAuthor()}" placeholder="请输入作者" />
            </div>
          </div>
          <div class="form-item">
            <div>
              <label>销量:</label>
              <input name="saleCount" th:value="*{getSaleCount()}" placeholder="请输入销量" />
            </div>
          </div>
          <div class="form-item">
            <div>
              <label>库存:</label>
              <input name="bookCount" th:value="*{getBookCount()}" placeholder="请输入库存" />
            </div>
          </div>
          <div class="form-item">
            <div>
              <label>状态:0默认，1新上架，2热销，3推荐</label>
            </div>
          </div>
          <div class="form-item">
            <div>
              <label>状态:</label>
              <input name="bookStatus" th:value="*{getBookStatus()}" placeholder="请输入状态" />
            </div>
          </div>
          <button class="btn">提交</button>
        </form>
      </div>
    </div>
    <div class="bottom">
      <hr/>
    </div>
  </body>
</html>
